package net.oschina.android.adapter;

import net.oschina.android.ui.fragment.lastestBlogFragment;
import net.oschina.android.ui.fragment.latestNewFragment;
import net.oschina.android.ui.fragment.recommendBlogFragment;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

/**
 * @author HuangWenwei
 *
 * @date 2014年8月27日
 */
public class newAdapter extends FragmentPagerAdapter {

	/**
	 * @param fm
	 */
	public newAdapter(FragmentManager fm) {
		super(fm);
	}

	@Override
	public Fragment getItem(int arg0) {
		switch (arg0) {
		case 0:
			return new latestNewFragment();
		case 1:
			return new lastestBlogFragment();
		case 2:
			return new recommendBlogFragment();
		default:
			break;
		}
		return null;
	}
	
	@Override
	public int getCount() {
		return 3;
	}

}
